[%
<wizard>
	<page>
		<title>Select data type</title>
		<description>Select data type for which to create a strongly typed collection</description>
		<variable name="datatype"/>
	</page>	
</wizard>
%]using System;
using System.Collections;


///////////////////////////////////////////////////////////////////////////////
// Tests:
// filename = [%<variable name="filename"/>%]
// directory = [%<variable name="directory"/>%]
// filenamebase = [%<variable name="filenamebase"/>%]
// fullfilename = [%<variable name="fullfilename"/>%]
// domainname = [%<variable name="domainname"/>%]
// username = [%<variable name="username"/>%]
// fullusername = [%<variable name="fullusername"/>%]
// domainusername = [%<variable name="domainusername"/>%]
// machinename = [%<variable name="machinename"/>%]
// projectname = [%<variable name="projectname"/>%]
// curdate = [%<variable name="curdate"/>%]
// namespace = [%<variable name="namespace"/>%]
// installdir = [%<variable name="installdir"/>%]
///////////////////////////////////////////////////////////////////////////////


namespace [%<variable name="namespace"/>%]
{

	public class [%<variable type="standard" name="filenamebase"/>%] : CollectionBase  
	{

		public [%<variable type="custom" name="datatype"/>%] this[ int index ]  
		{
			get  
			{
				return( ([%<variable type="custom" name="datatype"/>%]) List[index] );
			}
			set  
			{
				List[index] = value;
			}
		}

		public int Add( [%<variable type="custom" name="datatype"/>%] value )  
		{
			return( List.Add( value ) );
		}

		public int IndexOf( [%<variable type="custom" name="datatype"/>%] value )  
		{
			return( List.IndexOf( value ) );
		}

		public void Insert( int index, [%<variable type="custom" name="datatype"/>%] value )  
		{
			List.Insert( index, value );
		}

		public void Remove( [%<variable type="custom" name="datatype"/>%] value )  
		{
			List.Remove( value );
		}

		public bool Contains( [%<variable type="custom" name="datatype"/>%] value )  
		{
			// If value is not of type [%<variable type="custom" name="datatype"/>%], this will return false.
			return( List.Contains( value ) );
		}

	}
}